{% extends 'base.html' %}
{% include 'link_css.html' %}
{% block self_head_css_js %}
    {#    <link href="/static/alert/chosen.min.css" rel="stylesheet">#}
    <link href="/static/css/new_style.css" rel="stylesheet">
    <link href="/static/alert/select2.min.css" rel="stylesheet">
    <link href="/static/css/plugins/timepicker/bootstrap-timepicker.min.css" rel="stylesheet">
    <link href="/static/css/plugins/datepicker/datepicker3.css" rel="stylesheet">
{% endblock %}
{% block self_footer_js %}
    {#    <script src="/static/alert/chosen.jquery.min.js"></script>#}
    <script src="/static/alert/select2.min.js"></script>
    <script src="/static/js/timepicker/bootstrap-timepicker.js"></script>
    <script src="/static/js/datapicker/bootstrap-datepicker.js"></script>
{% endblock %}
{% block content %}
    <p class="text-center"><a target="_blank"
           href="https://www.tapd.cn/20257541/markdown_wikis/view/#1120257541001011545"
           class="center-block">帮助文档</a></p>
    <div class="tabs-container">
        <ul class="nav nav-tabs">
            <li id="projectInfo" class=""><a href="/asset/project/init/list/">项目初始化</a></li>
            <li id="approvalLevelList" class=""><a href="/asset/project/level/list/">审批级别</a></li>
            <li id="initTemplate" class="" style="display: none"><a href="/asset/project/template/list/">通用模板</a></li>
            <li id="publishSheet" class=""><a href="/asset/project/publishsheet/list/">发布单</a></li>
            <li id="createTab" class="" style="display: none"><a data-toggle="tab" href="#tab-3">创建发布单</a></li>
            <li id="doneSheet" class=""><a href="/asset/project/publishsheet/list/done/">完成&作废</a>
            </li>
            <li id="publishResult" class="active" style="display: none"><a
                    href=#>发布结果</a></li>
        </ul>
        <div class="tab-content">

            <div id="tab-7" class="tab-pane active">
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div class="row" id="publish_result">
                        <div class="col-lg-12">
                            {% if publish_result %}
                                <div class="ibox">
                                    <div class="ibox-content">
                                        <div class="text-center">
                                            <h3>发布结果</h3>
                                            <p style="color: blue"><i class="fa fa-check-square-o"></i>
                                                服务发布上线后，请检查服务是否正常！！！
                                            </p>
                                        </div>

                                        <ul class="sortable-list connectList agile-list ui-sortable" id="publish_done">
                                            {% for dic in publish_result %}
                                                <li {% if publish_ok == '1' %} class="success-element" {% else %}
                                                                               class="danger-element" {% endif %}>
                                                    {% for k,v in dic.items %}
                                                        {% if k %}
                                                            <h2 style="color: red">{{ k }}:</h2>

                                                            <pre style="border: none">
                                                            <li>{{ v }}</li>
                                                            </pre>
                                                        {% endif %}
                                                    {% endfor %}
                                                </li>
                                            {% endfor %}
                                        </ul>
                                    </div>
                                </div>
                            {% else %}
                                <div class="ibox">
                                    <div class="ibox-content">
                                        <div class="text-center">
                                            <h3>发布结果</h3>
                                            <p style="color: blue"><i class="fa fa-check-square-o"></i>
                                                服务发布上线后，请检查服务是否正常！！！
                                            </p>
                                        </div>

                                        <ul class="sortable-list connectList agile-list ui-sortable"
                                            id="publish_done_ex">
                                            <li class="warning-element">
                                                <h2 style="color: orange">请等待:</h2>
                                                <pre style="border: none">
                                            <li>请耐心等待发布完成，稍后请刷新</li>
                                            </pre>

                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <script src="/static/js/custom/publish_result.js"></script>

{% endblock %}